This markdown will hopefully accomplish the following data cleaning and diagnostic checks
In the cannon task, participants are instructed to place a shield at any point around a circle (Nassar et al., 2019). This shield covers only a portion of the 360-degree circle. The goal of the task is to infer where a cannonball might hit along the circle based on the information gathered from previous cannonball strikes and place the shield at those locations. Before each block of the task, the generative structure of the block is fully explained to the participants via written instructions and practice trials of the task. During the practice trials, participants can see where the cannon is aimed and use that information to place their shield. The cannon could theoretically hit anywhere within a 10-degree range from the center of the cannon’s muzzle. After this practice phase, participants complete the primary experiment where the cannon is removed and they must infer the cannon’s aim. The pattern of the cannon’s aim can either (1) change slightly within a specified range of the circle, with “oddball” cannonball shots striking about 14 percent of the time anywhere along the circle, or (2) remain stationary on most trials, and re-position to a random angle on approximately 14 percent of trials and remain stationary at this new angle. Participants receive explicit instructions regarding the nature of each of these blocks following the instructional phase, meaning they know whether the upcoming block will be from an oddball or change-point distribution. Participants complete 240 experimental trials in each condition, divided into 60-trial blocks, for a total of 480 trials. On each trial, participants adjust the position of their shield and lock in their decision. After their choice has been made, there is a 500ms delay before the location of the cannonball is revealed for 500ms. This provides an explicit representation of how far away the center of the shield fell from the cannonball’s strike, providing visual feedback about their PE from the cannonball’s actual location (Figure 2a, ii). After participants are shown how far off they were, the outcome of the task is revealed (Figure 2a, iii). After another brief delay (1000ms), the size of the participant’s shield is revealed alongside the cannonball, showing whether they successfully blocked the projectile. While the shield is always centered on the participant’s chosen location, it varies in size such that participants are never totally certain they will block the cannonball. Thus, minimizing the PE in the feedback phase is the optimal strategy for performing well in the task. At the end of a block, participants are provided feedback in terms of how many cannonballs they caught as a percentage of the total cannonballs.
This dataframe resulting from this cleaning is an example dataset. Because the cleaning code will be updated, the current cleaning code does not need to be reviewed unless you suspect anaomalies in the resulting dataframe. For any questions related to the definition of task variables, please refer to: https://docs.google.com/spreadsheets/d/1V2UD28C_zAfH90BnNO3si6c0-qDUDFbHoU44rfdEt4I/edit#gid=1309555968. Skip to heading Pilot Results for information on pilot data.
It should also be noted that data for this pilot came from two, slightly different versions of the ADLT. The first version failed to record trial latency. Thus, latencies were only examined for a subset of participants.
####Setup - Conditionals
plot_print <- "all" # could be "random"
The majority of the work being done here is occuring behind the scenes in tidy_functions
This chunk sets new variables and alters any old ones that need to be tidied. The variables created by the set_vars vector are: Abs_PE. Absolute prediction error (calculated using the discrep function): the PE from outcome to shield placement PE_angmu. Prediction error from mean of distribution to shield placement. Calculated with discrep function. catch_miss. Codes values as factors “catch”, “miss”, “noresp”. Used for coding and mean comparison changepoint A column that reflects the trial number of changepoints. contains trial number when changepoint occurs and NA when no changepoint has occured.
Table 1. High-Level Task Performance. This check returns block-level info about subject’s performance. Participants are flagged if they did not respond to more than half of trials.
It’s probably worth writing this into a function as well. I should probably do this before I implement high-level checks. Ideas for things I might need to check are: Miscodes. Misses that are actually hits, Hits that are actually misses, etc. Odd numbers of trials Participants bailing early on the task, getting stuck somewhere, etc.
cannon_data <- check_irreg(cannon_data) #check for any mistaken hits
irreg_plot_hit <- cannon_data %>% filter(grepl("CHECK_HIT", Irreg)) %>% select(subject, cond, blocknum, trialnum, catch_miss, angmu, placementAngle, outcome, Abs_PE, angleup, angledown, shield_size, Irreg )
irreg_plot_miss <- cannon_data %>% filter(grepl("CHECK_MISS", Irreg)) %>% select(subject, cond, blocknum, trialnum, catch_miss, angmu, placementAngle, outcome, Abs_PE, angleup, angledown, shield_size, Irreg )
irreg_plot_NA <- cannon_data %>% filter(grepl("CHECK_NA", Irreg)) %>% select(subject, cond, blocknum, trialnum, catch_miss, angmu, placementAngle, outcome, Abs_PE, angleup, angledown, shield_size, Irreg)
obj <- cannon_data %>% group_by(subject, cond, blocknum, totalearnings) %>%
summarise(obscount = n(), avg_PE = mean(Abs_PE, na.rm = TRUE),
dist_mean = mean(PE_angmu,na.rm = TRUE),
percent_caught = max(cannonballs_caught/max(trialnum)),
percent_noresp = (sum(outcomeindex == 1)/max(trialnum))) %>%
arrange(subject,totalearnings) %>% group_by(subject) %>% mutate(taskearnings = max(totalearnings)) %>% mutate(Avg_overall_PE = mean(avg_PE, na.rm = TRUE)) %>% ungroup()
save(obj, cannon_data, file = "Cannonball_Pilot_Example_Perfect_Data.Rdata")
colormatrix <- ifelse(obj$percent_noresp >= .2, wes_palette("Cavalcanti1")[c(1)], "white") ##potentially save these as bad_blocks vector
bad_blocks <- obj %>% dplyr::filter(percent_noresp >= .2)
tab <- obj %>% flextable() %>% bg(j = 1:10, bg=colormatrix)
sink("/dev/null")
tab
subject | cond | blocknum | totalearnings | obscount | avg_PE | dist_mean | percent_caught | percent_noresp | taskearnings | Avg_overall_PE |
364 | ODDBALL | 1 | 7.0 | 60 | 47.70814 | 27.373115 | 0.3500000 | 0.00000000 | 95.0 | 34.45289 |
364 | ODDBALL | 2 | 17.5 | 60 | 28.20098 | 11.497697 | 0.5500000 | 0.00000000 | 95.0 | 34.45289 |
364 | ODDBALL | 3 | 34.0 | 60 | 29.20829 | 19.296747 | 0.3333333 | 0.00000000 | 95.0 | 34.45289 |
364 | ODDBALL | 4 | 44.0 | 60 | 29.19695 | 11.981920 | 0.3833333 | 0.00000000 | 95.0 | 34.45289 |
364 | CHANGEPOINT | 1 | 60.0 | 60 | 35.41543 | 29.752510 | 0.4666667 | 0.00000000 | 95.0 | 34.45289 |
364 | CHANGEPOINT | 2 | 74.0 | 60 | 34.42547 | 27.038611 | 0.3333333 | 0.00000000 | 95.0 | 34.45289 |
364 | CHANGEPOINT | 3 | 84.0 | 60 | 37.20315 | 35.118380 | 0.3666667 | 0.00000000 | 95.0 | 34.45289 |
364 | CHANGEPOINT | 4 | 95.0 | 60 | 34.26472 | 26.664867 | 0.3333333 | 0.00000000 | 95.0 | 34.45289 |
400 | CHANGEPOINT | 1 | 6.0 | 60 | 34.76671 | 31.982583 | 0.4000000 | 0.00000000 | 96.5 | 31.76133 |
400 | CHANGEPOINT | 2 | 18.0 | 60 | 33.54090 | 31.866902 | 0.3500000 | 0.00000000 | 96.5 | 31.76133 |
400 | CHANGEPOINT | 3 | 28.5 | 60 | 34.41095 | 29.638546 | 0.3500000 | 0.00000000 | 96.5 | 31.76133 |
400 | CHANGEPOINT | 4 | 39.0 | 60 | 30.43282 | 27.020370 | 0.5000000 | 0.00000000 | 96.5 | 31.76133 |
400 | ODDBALL | 1 | 57.5 | 60 | 27.19565 | 14.791119 | 0.4833333 | 0.00000000 | 96.5 | 31.76133 |
400 | ODDBALL | 2 | 72.0 | 60 | 33.96318 | 14.135910 | 0.4500000 | 0.00000000 | 96.5 | 31.76133 |
400 | ODDBALL | 3 | 85.5 | 60 | 28.13848 | 10.921029 | 0.3666667 | 0.00000000 | 96.5 | 31.76133 |
400 | ODDBALL | 4 | 96.5 | 60 | 31.64196 | 14.181792 | 0.4000000 | 0.00000000 | 96.5 | 31.76133 |
455 | CHANGEPOINT | 1 | 5.5 | 60 | 42.44487 | 39.487840 | 0.4000000 | 0.00000000 | 107.5 | 32.26254 |
455 | ODDBALL | 1 | 6.0 | 60 | 25.82192 | 7.806403 | 0.6000000 | 0.00000000 | 107.5 | 32.26254 |
455 | CHANGEPOINT | 2 | 17.5 | 23 | 37.31251 | 28.291352 | 0.3684211 | 0.26315789 | 107.5 | 32.26254 |
455 | CHANGEPOINT | 3 | 17.5 | 1 | NaN | NaN | 7.0000000 | 1.00000000 | 107.5 | 32.26254 |
455 | ODDBALL | 2 | 24.0 | 60 | 30.48086 | 10.746947 | 0.5500000 | 0.00000000 | 107.5 | 32.26254 |
455 | ODDBALL | 3 | 40.5 | 60 | 37.08033 | 22.420291 | 0.3166667 | 0.00000000 | 107.5 | 32.26254 |
455 | ODDBALL | 4 | 50.0 | 60 | 33.82529 | 16.553933 | 0.4000000 | 0.00000000 | 107.5 | 32.26254 |
455 | CHANGEPOINT | 1 | 67.0 | 60 | 28.57125 | 21.485818 | 0.4000000 | 0.00000000 | 107.5 | 32.26254 |
455 | CHANGEPOINT | 2 | 79.0 | 60 | 29.41493 | 24.332750 | 0.4833333 | 0.00000000 | 107.5 | 32.26254 |
455 | CHANGEPOINT | 3 | 93.5 | 60 | 34.09523 | 30.436619 | 0.4666667 | 0.00000000 | 107.5 | 32.26254 |
455 | CHANGEPOINT | 4 | 107.5 | 60 | 23.57821 | 16.248584 | 0.4500000 | 0.00000000 | 107.5 | 32.26254 |
576 | ODDBALL | 1 | 6.0 | 60 | 46.60105 | 33.727181 | 0.2333333 | 0.00000000 | 91.0 | 35.00859 |
576 | ODDBALL | 2 | 13.0 | 60 | 29.77153 | 22.231551 | 0.3500000 | 0.00000000 | 91.0 | 35.00859 |
576 | ODDBALL | 3 | 23.5 | 60 | 37.68574 | 19.452241 | 0.3166667 | 0.00000000 | 91.0 | 35.00859 |
576 | ODDBALL | 4 | 33.0 | 60 | 29.63403 | 12.485928 | 0.5000000 | 0.00000000 | 91.0 | 35.00859 |
576 | CHANGEPOINT | 1 | 52.0 | 61 | 40.24977 | 32.250550 | 0.3166667 | 0.01666667 | 91.0 | 35.00859 |
576 | CHANGEPOINT | 2 | 61.5 | 60 | 26.41029 | 17.791251 | 0.5500000 | 0.00000000 | 91.0 | 35.00859 |
576 | CHANGEPOINT | 3 | 78.0 | 60 | 36.12394 | 29.554978 | 0.4333333 | 0.00000000 | 91.0 | 35.00859 |
576 | CHANGEPOINT | 4 | 91.0 | 60 | 33.59236 | 27.926018 | 0.4000000 | 0.00000000 | 91.0 | 35.00859 |
629 | CHANGEPOINT | 1 | 6.0 | 60 | 36.31708 | 34.497289 | 0.4000000 | 0.00000000 | 86.5 | 36.82969 |
629 | CHANGEPOINT | 2 | 18.0 | 60 | 32.65976 | 27.864606 | 0.4166667 | 0.00000000 | 86.5 | 36.82969 |
629 | CHANGEPOINT | 3 | 30.5 | 60 | 36.97084 | 30.933104 | 0.3333333 | 0.00000000 | 86.5 | 36.82969 |
629 | CHANGEPOINT | 4 | 40.5 | 61 | 31.09010 | 24.975045 | 0.3500000 | 0.01666667 | 86.5 | 36.82969 |
629 | ODDBALL | 1 | 54.5 | 60 | 55.62121 | 35.622707 | 0.2666667 | 0.00000000 | 86.5 | 36.82969 |
629 | ODDBALL | 2 | 62.5 | 60 | 34.75227 | 19.278573 | 0.4166667 | 0.00000000 | 86.5 | 36.82969 |
629 | ODDBALL | 3 | 75.0 | 60 | 36.78955 | 25.397277 | 0.3833333 | 0.00000000 | 86.5 | 36.82969 |
629 | ODDBALL | 4 | 86.5 | 60 | 30.43674 | 15.098659 | 0.5666667 | 0.00000000 | 86.5 | 36.82969 |
649 | ODDBALL | 1 | 6.0 | 60 | 27.22149 | 21.836616 | 0.4166667 | 0.00000000 | 87.0 | 37.35132 |
649 | ODDBALL | 2 | 18.5 | 61 | 46.01929 | 34.227465 | 0.3333333 | 0.01666667 | 87.0 | 37.35132 |
649 | ODDBALL | 3 | 28.5 | 60 | 37.74423 | 23.903617 | 0.4000000 | 0.00000000 | 87.0 | 37.35132 |
649 | ODDBALL | 4 | 40.5 | 60 | 40.70184 | 24.467198 | 0.3500000 | 0.00000000 | 87.0 | 37.35132 |
649 | CHANGEPOINT | 1 | 54.5 | 62 | 28.67589 | 25.633033 | 0.4500000 | 0.03333333 | 87.0 | 37.35132 |
649 | CHANGEPOINT | 2 | 68.0 | 60 | 39.40052 | 36.259248 | 0.3000000 | 0.00000000 | 87.0 | 37.35132 |
649 | CHANGEPOINT | 3 | 77.0 | 60 | 38.65265 | 34.136127 | 0.3333333 | 0.00000000 | 87.0 | 37.35132 |
649 | CHANGEPOINT | 4 | 87.0 | 60 | 40.39468 | 35.274746 | 0.3666667 | 0.00000000 | 87.0 | 37.35132 |
746 | CHANGEPOINT | 1 | 6.0 | 60 | 52.10488 | 46.937477 | 0.2000000 | 0.00000000 | 79.5 | 40.80936 |
746 | CHANGEPOINT | 2 | 12.0 | 60 | 28.76319 | 24.270125 | 0.3666667 | 0.00000000 | 79.5 | 40.80936 |
746 | CHANGEPOINT | 3 | 23.0 | 60 | 35.12056 | 29.125871 | 0.4000000 | 0.00000000 | 79.5 | 40.80936 |
746 | CHANGEPOINT | 4 | 35.0 | 60 | 37.21908 | 31.311846 | 0.4000000 | 0.00000000 | 79.5 | 40.80936 |
746 | ODDBALL | 1 | 50.5 | 60 | 43.60575 | 26.144958 | 0.2666667 | 0.00000000 | 79.5 | 40.80936 |
746 | ODDBALL | 2 | 58.5 | 60 | 38.89578 | 26.910302 | 0.3833333 | 0.00000000 | 79.5 | 40.80936 |
746 | ODDBALL | 3 | 70.0 | 60 | 43.83480 | 29.002452 | 0.3166667 | 0.00000000 | 79.5 | 40.80936 |
746 | ODDBALL | 4 | 79.5 | 60 | 46.93086 | 29.077890 | 0.4333333 | 0.00000000 | 79.5 | 40.80936 |
749 | ODDBALL | 1 | 5.5 | 61 | 51.07748 | 35.408264 | 0.2666667 | 0.01666667 | 72.0 | 41.29137 |
749 | ODDBALL | 2 | 13.5 | 60 | 47.28898 | 33.332059 | 0.2000000 | 0.00000000 | 72.0 | 41.29137 |
749 | ODDBALL | 3 | 19.5 | 60 | 34.01788 | 20.882086 | 0.3833333 | 0.00000000 | 72.0 | 41.29137 |
749 | ODDBALL | 4 | 31.0 | 60 | 44.64863 | 33.019453 | 0.3166667 | 0.00000000 | 72.0 | 41.29137 |
749 | CHANGEPOINT | 1 | 44.0 | 60 | 40.57515 | 38.397705 | 0.3000000 | 0.00000000 | 72.0 | 41.29137 |
749 | CHANGEPOINT | 2 | 53.0 | 60 | 41.21824 | 34.851561 | 0.3333333 | 0.00000000 | 72.0 | 41.29137 |
749 | CHANGEPOINT | 3 | 63.0 | 60 | 35.91092 | 31.390281 | 0.3000000 | 0.00000000 | 72.0 | 41.29137 |
749 | CHANGEPOINT | 4 | 72.0 | 61 | 35.59363 | 31.996868 | 0.3500000 | 0.01666667 | 72.0 | 41.29137 |
925 | CHANGEPOINT | 1 | 5.5 | 60 | 33.33135 | 29.562301 | 0.4000000 | 0.00000000 | 105.5 | 31.61699 |
925 | CHANGEPOINT | 2 | 17.5 | 60 | 27.74771 | 23.391487 | 0.5500000 | 0.00000000 | 105.5 | 31.61699 |
925 | CHANGEPOINT | 3 | 34.0 | 60 | 34.04666 | 29.792290 | 0.4333333 | 0.00000000 | 105.5 | 31.61699 |
925 | CHANGEPOINT | 4 | 47.0 | 60 | 31.16443 | 30.355131 | 0.4333333 | 0.00000000 | 105.5 | 31.61699 |
925 | ODDBALL | 1 | 63.5 | 60 | 23.34026 | 11.119006 | 0.5000000 | 0.00000000 | 105.5 | 31.61699 |
925 | ODDBALL | 2 | 78.5 | 60 | 29.78716 | 18.987555 | 0.5333333 | 0.00000000 | 105.5 | 31.61699 |
925 | ODDBALL | 3 | 94.5 | 60 | 33.77020 | 18.832966 | 0.3666667 | 0.00000000 | 105.5 | 31.61699 |
925 | ODDBALL | 4 | 105.5 | 60 | 39.74811 | 16.070638 | 0.4000000 | 0.00000000 | 105.5 | 31.61699 |
987 | CHANGEPOINT | 1 | 6.0 | 60 | 31.64553 | 24.847342 | 0.3666667 | 0.00000000 | 78.5 | 37.08251 |
987 | CHANGEPOINT | 2 | 17.0 | 60 | 38.64649 | 35.572531 | 0.2666667 | 0.00000000 | 78.5 | 37.08251 |
987 | CHANGEPOINT | 3 | 25.0 | 60 | 31.12037 | 28.738852 | 0.2666667 | 0.00000000 | 78.5 | 37.08251 |
987 | CHANGEPOINT | 4 | 33.0 | 60 | 29.13240 | 22.787501 | 0.4166667 | 0.00000000 | 78.5 | 37.08251 |
987 | ODDBALL | 1 | 49.0 | 60 | 36.17780 | 20.027808 | 0.3833333 | 0.00000000 | 78.5 | 37.08251 |
987 | ODDBALL | 2 | 60.5 | 60 | 44.90893 | 32.767667 | 0.2833333 | 0.00000000 | 78.5 | 37.08251 |
987 | ODDBALL | 3 | 69.0 | 60 | 43.91497 | 25.224111 | 0.3166667 | 0.00000000 | 78.5 | 37.08251 |
987 | ODDBALL | 4 | 78.5 | 60 | 41.11359 | 23.064621 | 0.2833333 | 0.00000000 | 78.5 | 37.08251 |
sink();
Figure 1. Below is a histogram of all reaction time data.
Hist_outliers <- ggplot(cannon_data, aes(x=trial.placeshield_mouse.latency)) + geom_histogram()
Mean_cleaned <- cannon_data %>% ungroup () %>% filter(!trial.placeshield_mouse.latency == 2500) %>% summarise(mean = mean(trial.placeshield_mouse.latency))
Hist_outliers; Mean_cleaned
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.
## Warning: Removed 13 rows containing non-finite values (stat_bin).
## # A tibble: 1 x 1
## mean
## <dbl>
## 1 396.
oddball_PE <- list();changepoint_PE <- list();oddball_DM <- list(); changepoint_DM <- list()
subjects <- as.character(unique(cannon_data$subject))
subjects_list <- list(as.character(unique(cannon_data$subject)))
for (i in subjects) {
o <- cannon_data %>% dplyr::filter(subject == i & cond == "ODDBALL")
oddballPE <- ggplot(o, aes(x=trialnum, y=Abs_PE, color = catch_miss)) +
geom_point() +
geom_vline(aes(xintercept = changepoint, color = "Oddball")) + scale_color_manual(values = (wes_palette("Cavalcanti1")[c(2,5,1,4)])) +
xlab("Trial Number") + ylab("Response Type") + ggtitle(i) +
facet_wrap(~blocknum)
oddball_PE[[i]] <- oddballPE
oddballDM <- ggplot(o, aes(x=trialnum, y=PE_angmu, color = catch_miss)) +
geom_point() +
geom_vline(aes(xintercept = changepoint, color = "Oddball")) + scale_color_manual(values = (wes_palette("Cavalcanti1")[c(2,5,1,4)])) +
xlab("Trial Number") + ylab("Response Type") + ggtitle(i) +
facet_wrap(~blocknum)
oddball_DM[[i]] <- oddballDM
c <- cannon_data %>% dplyr::filter(subject == i & cond == "CHANGEPOINT")
changepointPE <- ggplot(c,aes(x=trialnum, y=Abs_PE, color = catch_miss)) + geom_point() +
geom_vline(aes(xintercept = changepoint, color = "Changepoint")) + scale_color_manual(values = (wes_palette("Cavalcanti1")[c(4,2,5,1)])) +
xlab("Trial Number") + ylab("Response Type") + ggtitle(i) +
facet_wrap(~blocknum)
changepoint_PE[[i]] <- changepointPE
changepointDM <- ggplot(c, aes(x=trialnum, y=PE_angmu, color = catch_miss)) +
geom_point() +
geom_vline(aes(xintercept = changepoint, color = "Changepoint")) + scale_color_manual(values = (wes_palette("Cavalcanti1")[c(4,2,1,5)])) +
xlab("Trial Number") + ylab("Response Type") + ggtitle(i) +
facet_wrap(~blocknum)
changepoint_DM[[i]] <- changepointDM
}
#changepoint_PE; changepoint_DM; oddball_DM; oddball_PE
template <- c(
"### OddballPE {{nm}}\n",
"```{r, echo = FALSE}\n",
"oddball_PE[[{{nm}}]] \n",
"```\n",
"\n"
)
plots <- lapply(1:length(oddball_PE), function(nm) {knitr::knit_expand(text = template)})
## Warning: Removed 205 rows containing missing values (geom_vline).
## Warning: Removed 1 rows containing missing values (geom_point).
## Warning: Removed 210 rows containing missing values (geom_vline).
## Warning: Removed 202 rows containing missing values (geom_vline).
## Warning: Removed 1 rows containing missing values (geom_point).
## Warning: Removed 207 rows containing missing values (geom_vline).
## Warning: Removed 208 rows containing missing values (geom_vline).
## Warning: Removed 202 rows containing missing values (geom_vline).
## Warning: Removed 204 rows containing missing values (geom_vline).
## Warning: Removed 206 rows containing missing values (geom_vline).
## Warning: Removed 208 rows containing missing values (geom_vline).
## Warning: Removed 204 rows containing missing values (geom_vline).
template <- c(
"### Changepoint_PE {{x}}\n",
"```{r, echo = FALSE}\n",
"changepoint_PE[[{{x}}]] \n",
"```\n",
"\n"
)
plots <- lapply(1:length(changepoint_PE), function(x) {knitr::knit_expand(text = template)})
## Warning: Removed 6 rows containing missing values (geom_point).
## Warning: Removed 273 rows containing missing values (geom_vline).
## Warning: Removed 1 rows containing missing values (geom_point).
## Warning: Removed 207 rows containing missing values (geom_vline).
## Warning: Removed 1 rows containing missing values (geom_point).
## Warning: Removed 211 rows containing missing values (geom_vline).
## Warning: Removed 2 rows containing missing values (geom_point).
## Warning: Removed 209 rows containing missing values (geom_vline).
## Warning: Removed 1 rows containing missing values (geom_point).
## Warning: Removed 204 rows containing missing values (geom_vline).
## Warning: Removed 210 rows containing missing values (geom_vline).
## Warning: Removed 208 rows containing missing values (geom_vline).
## Warning: Removed 206 rows containing missing values (geom_vline).
## Warning: Removed 205 rows containing missing values (geom_vline).
## Warning: Removed 207 rows containing missing values (geom_vline).
template <- c(
"### Changepoint_DM {{y}}\n",
"```{r, echo = FALSE}\n",
"changepoint_DM[[{{y}}]] \n",
"```\n",
"\n"
)
plots <- lapply(1:length(changepoint_DM), function(y) {knitr::knit_expand(text = template)})
## Warning: Removed 6 rows containing missing values (geom_point).
## Warning: Removed 273 rows containing missing values (geom_vline).
## Warning: Removed 1 rows containing missing values (geom_point).
## Warning: Removed 207 rows containing missing values (geom_vline).
## Warning: Removed 1 rows containing missing values (geom_point).
## Warning: Removed 211 rows containing missing values (geom_vline).
## Warning: Removed 2 rows containing missing values (geom_point).
## Warning: Removed 209 rows containing missing values (geom_vline).
## Warning: Removed 1 rows containing missing values (geom_point).
## Warning: Removed 204 rows containing missing values (geom_vline).
## Warning: Removed 210 rows containing missing values (geom_vline).
## Warning: Removed 208 rows containing missing values (geom_vline).
## Warning: Removed 206 rows containing missing values (geom_vline).
## Warning: Removed 205 rows containing missing values (geom_vline).
## Warning: Removed 207 rows containing missing values (geom_vline).
template <- c(
"### Oddball_DM {{z}}\n",
"```{r, echo = FALSE}\n",
"oddball_DM[[{{z}}]] \n",
"```\n",
"\n"
)
plots <- lapply(1:length(oddball_DM), function(z) {knitr::knit_expand(text = template)})
## Warning: Removed 205 rows containing missing values (geom_vline).
## Warning: Removed 1 rows containing missing values (geom_point).
## Warning: Removed 210 rows containing missing values (geom_vline).
## Warning: Removed 202 rows containing missing values (geom_vline).
## Warning: Removed 1 rows containing missing values (geom_point).
## Warning: Removed 207 rows containing missing values (geom_vline).
## Warning: Removed 208 rows containing missing values (geom_vline).
## Warning: Removed 202 rows containing missing values (geom_vline).
## Warning: Removed 204 rows containing missing values (geom_vline).
## Warning: Removed 206 rows containing missing values (geom_vline).
## Warning: Removed 208 rows containing missing values (geom_vline).
## Warning: Removed 204 rows containing missing values (geom_vline).